Embedding a Language with Certified Size Constraints in a Dependently Typed Metalanguage
نویسندگان
چکیده
This paper studies the problem of constructing formal bounds on program resource usage and other complex properties. We use fullspectrum dependent types to embed a language of terms, RAFL, with resource usage properties and associated correctness proofs. Since these properties and associated proofs are directly expressed inRAFL through a formal logic, it follows that correctly specified resource properties of programs written inRAFL can be formally verified simply by composing proofs according to the underlying program structure. We illustrate this by constructing a dependently typed interpreter forRAFL that ensures that the representation of RAFL terms includes explicit and independently checkable proofs that the required resource properties are satisfied. In this way we are able to construct programs with strong bounds on resource usage that can be automatically checked. Compared with other approaches to bounding resource usage, our work has the twin advantages of flexibility and generality, whilst retaining simplicity and automation. We demonstrate these advantages by considering some representative operations on lists and trees.
منابع مشابه
ΠΣ: A Core Language for Dependently Typed Programming
We introduce ΠΣ, a core language for dependently typed programming. Our intention is that ΠΣ should play the role extensions of System F are playing for conventional functional languages with polymorphism, like Haskell. The core language incorporates mutual dependent recursive definitions, Type : Type, Πand Σ-types, finite sets of labels and explicit constraints. We show that standard construct...
متن کاملFormal Verification of Hardware Synthesis
We report on the implementation of a certified compiler for a high-level hardware description language (HDL) called Fe-Si (FEatherweight SynthesIs). Fe-Si is a simplified version of Bluespec, an HDL based on a notion of guarded atomic actions. Fe-Si is defined as a dependently typed deep embedding in Coq. The target language of the compiler corresponds to a synthesisable subset of Verilog or VH...
متن کاملA Framework for Dependent Types and Effects
We generalise Levy’s call-by-push-value (CBPV) to dependent type theory, to gain a better understanding of how to combine dependent types with effects. We define a dependently typed extension of CBPV, dCBPV-, and show that it has a very natural small-step operational semantics, which satisfies subject reduction and (depending on the effects present) determinism and strong normalization, and an ...
متن کاملCertified CYK parsing of context-free languages
We report a work on certified parsing for context-free grammars. In our development we implement the Cocke–Younger–Kasami parsing algorithm and prove it correct using the Agda dependently typed programming language.
متن کاملDependently Typed Programming with Domain-Specific Logics (Thesis Proposal DRAFT)
We propose a thesis defending the following statement: The logical notions of polarity and focusing provide a foundation for dependently typed programming with domain-specific logics, with applications to certified software and mechanized metatheory.
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2006